const { DataTypes } = require('sequelize');
const sequelize = require('../db/seq')


const Content = sequelize.define('Content', {
    // 在这里定义模型属性
       
    name: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '文章名称'
    },
    description: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '文章描述'
    },
    imgUrl: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '文章图片'
    },
   
       category: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '文章分类'
    },
    subcategory: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '子文章分类'
    },
    title: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '文章标题'
    },
    content: {
        type: DataTypes.TEXT,
        allowNull: true,
        comment: '文章内容'
    },
    contentUrl: {
        type: DataTypes.STRING,
        allowNull: true,
        comment: '文章链接'
    },
      
},
{ paranoid: true });
//   Content.sync({ force: true })
module.exports = Content
 